public class StudentTest {

	public static void main(String[] args) {

		Student student = null;
		int choice = 0;
		int option;
		do {
			System.out.println("[1].CREATE\t\t[2].LIST");
			System.out.println("========================================\n\n");

			option = KeyBoard.readInt("Enter Choice =========>>>> : ");

			switch (option) {
			case 1:
				student = new Student();
				student.setId(KeyBoard.readInt("Enter ID : "));
				student.setName(KeyBoard.readString("Enter Name : "));
				student.setAge(KeyBoard.readInt("Enter Age : "));
				student.setGender(KeyBoard.readString("Enter Gender : "));
				student.setCourse(KeyBoard.readString("Enter Course : "));
				StudentService studentService = StudentService.getInstance();
				System.out.println(studentService.hashCode());

				studentService.create(student);
				System.out.println("====>>Record Created<<====");

				break;

			case 2:
				StudentService studentService2 = StudentService.getInstance();
				System.out.println(studentService2.hashCode());
				Student[] students = studentService2.getAll();
				System.out.println("COUNT : " + StudentService.COUNT);
				for (int i = 0; i < StudentService.COUNT; i++) {
					Student std = students[i];
					System.out.println(std);
				}
				break;

			default:
				System.out.println("Enter Valid Choice");
				break;
			}

			choice = KeyBoard.readInt("Do You Want to Continue ? (1/0) : ");
		} while (choice != 0);

	}

}
